﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<KLS.PPDS.Web.Models.ArticleContentViewModel>" %>
<%@ Import Namespace="KLS.PPDS.Resources" %>
<%@ Import Namespace="KLS.PPDS.Utility.Html" %>
<%@ Import Namespace="KLS.PPDS.Utility" %>
<script type="text/javascript">
    //    $(document).ready(function () {
    //        Shadowbox.init({
    //            handleOversize: "drag",
    //            modal: true
    //        });
    //    });

    // alert('dddd');
</script>

<div class="articleContent" id="articleContent_<%:Model.Id %>">
    <hr />
    <%
        using (Html.BeginForm("SaveArticleContent", "ArticleContent", FormMethod.Post, new { @ID = "frm_" + Model.Id, @class = "article-content-form", @enctype = "multipart/form-data", @onkeypress = "ApplySubArticleEnter(event,'div#ArticleContentSubmitButton_" + Model.Id + "');" }))
        //using (Html.BeginForm("SaveArticleContent", "ArticleContent", FormMethod.Post, new {@ID="frm_"+Model.Id,  @class = "article-content-form", @enctype = "multipart/form-data" }))
        {
            Model.OldTextDisable = Model.IsTextDisable;
            Model.OldComments = Model.Comments;
            Model.OldHeadline = Model.Headline;

            Model.OldReadyForEditing = Model.IsReadyForEditor;
            Model.OldReadyForGraphics = Model.IsReadyForGraphic;
            
    %>
    <%:Html.HiddenFor(c=>c.Id) %>
    <%:Html.HiddenFor(c=>c.ArticleId) %>
    <%:Html.HiddenFor(c=>c.CreatedBy) %>
    <%:Html.HiddenFor(c=>c.CreatedDate) %>
    <%:Html.HiddenFor(c=>c.PublicationId) %>
    <%:Html.HiddenFor(c => c.CompanyId)%>
    <%: Html.HiddenFor(model => model.UpdatedBy) %>
    <%: Html.HiddenFor(model => model.OldComments)%>
    <%: Html.HiddenFor(model => model.OldHeadline)%>
    <%: Html.HiddenFor(model => model.OldTextDisable)%>
    <%: Html.HiddenFor(model => model.OldReadyForEditing)%>
    <%: Html.HiddenFor(model => model.OldReadyForGraphics)%>
    <div class="content-heading">
       
<%--        <div class="cell">
            <%:Html.Label(CommonString.ContentHeading)%>
        </div>
          <div class="cell">
            <%:Html.TextBoxFor(c => c.Headline, headLine)%>
          </div>--%>
         
    </div>
    <div class="articleContentMiddle">
        
            <table class="tbl-article-content">                    
                    <%Html.RenderPartial(@"~/Views/Article/ArticleContentHeadingFlashControl.ascx", Model);%>
                    <%Html.RenderPartial(@"~/Views/Article/UploadTextHtmlControl.ascx", Model);%>
                    <%Html.RenderPartial(@"~/Views/Article/UploadImageHtmlControl.ascx", Model);%>
                    <%Html.RenderPartial(@"~/Views/Article/ArticleContentFlashButtonControl.ascx", Model);%>
            </table>
        
    </div>
    <div class="articleContentLeft" id="txt_thumbs_<%:Model.Id%>">
       
            <%Html.RenderPartial(@"~/Views/Article/TextThumbnail.ascx", Model);%>
        
    </div>
    
    <div class="articleContentRight" id="img_thumbs_<%:Model.Id%>">
       
            <%--            <%foreach (var item in Model.ImageFiles) 
              {%>
                <%Html.RenderPartial(@"~/Views/Article/ImageThumnail.ascx", item);%>

              <%}%>--%>
            <%Html.RenderPartial(@"~/Views/Article/NewImageThumbnail.ascx", Model);%>
        
    </div>
    <%} %>
</div>
<div style="clear: both">
</div>
